<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>

        .homeBox {
            display: flex;
            justify-content: space-around;

        }

    </style>
</head>

<body>
    <div id="app">
        <h1>{{msg}}</h1>


        <home>
            <span v-slot:left>左边返回箭头</span>
             <h2>中间是title</h2>
             <span  v-slot:right>右边加载更多小图标</span>
         </home>

         <hr>

         <home >
            <span v-slot:left>左边返回箭头</span>
             <h2>中间是title</h2>

         </home>

    </div>



    <!-- 模板  -->


    <template id='home'>
        <div class="homeBox">
          
            <!-- 具名插槽 -->
         <slot  name='left'></slot>
          <slot ></slot>
          <slot  name='right'></slot>   
        </div>
    </template>


    <script src="./vue.js"></script>
    <script>


Vue.component("home",{
       template:'#home'
       
       
   })

        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'vue'
            },
            methods: {
            }
        });
    </script>
</body>

</html>
<!--  -->